<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="dwz" uri="http://www.lyjuan.cn/dwz/tags" %>
<div class="pageContent">
	<form method="post" action="<dwz:url url="manage/updateManage"/>" class="pageForm"
          onsubmit="return validateCallback(this, customDialogAjaxDone(true, 'manage_manageList'));">
		<div class="pageFormContent" layoutH="58">
			<p>
				<label>账号：</label>
				<input type="text" name="name" value="${manage.name}" readonly/>
			</p>
			<p>
				<label>密码：</label>
				<input type="text" size="80" id="pwd" name="pwd" value="${manage.pwd}" class="required"/>
				
            </p>
            <p>
                <label>&nbsp;</label>
                <input type="button" onclick="resetPwd();" style="width:206px;" value="刷新密码" tabindex="3"/>
            </p>
			
			<p>
				<label>说明：</label>
				<input type="text" name="info" style="width:200px;" value="${manage.info}" class="required"/>
			</p>
			<p>
				<label>状态：</label>
				<input type="radio" name="status" value="1" id="status_normal" <c:if test="${1 == manage.status}">checked="checked"</c:if> />
                <span onclick="$(this).parents('form:first').find('#status_normal').click();">正常</span>&nbsp;&nbsp;
				<input type="radio" name="status" value="0" id="status_lock" <c:if test="${0 == manage.status}">checked="checked"</c:if> />
                <span onclick="$(this).parents('form:first').find('#status_lock').click();">锁定</span>
			</p>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>
	
</div>


<script>
	/**
	 * 重置密码
	 */
	var resetPwd = function()
	{
		var text = 'abcdefghijkmnpqrstuvwxyzABCDEFGHJKMNPQRSTUVWXYZ2345678923456789';// 去掉 l L 1 I 0 o O，并增大数字的比例
		var pwd = [];
		for (var i = 0; i < 6; i++)
		{
			var num = Math.random();
			num = num * 100;
			num = Math.floor(num);
			num = num % text.length;// text 长度
			pwd.push(text.charAt(num));
		}

		pwd = pwd.join('');

		document.getElementById('pwd').value = pwd;
	};
</script>